
/*

Design Pattern Automation Toolkit.
Application to create applications with emphasis on Design patterns.
And support for round trip engineering.
Copyright (C) 2004 Vineeth Neelakant. nvineeth@gmail.com

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

*/
using System;using BusinessLayer;using InfoClasses;using dpatoolkit.UILayer;
using DesignPatternDefinitions;
using System.Data;


namespace BusinessLayer
{
	/// <summary>
	/// 
	/// </summary>
	public class DPReference : IReference
	{
		DataRow refrow;
		public DPReference(DataRow row)
		{
			refrow = row;
		}
		#region IReference Members

		public string ReferenceComponent
		{
			get
			{
				return (string) this.refrow[SchemaNames.ReferenceComponent];
				
			}
			set
			{
				// TODO:  Add DPReference.ReferenceComponent setter implementation
			}
		}

		public string ReferenceClass
		{
			get
			{
				return (string) this.refrow[SchemaNames.ReferenceClass];
			}
			set
			{
				// TODO:  Add DPReference.ReferenceClass setter implementation
			}
		}

		public string ReferedClassName
		{
			get
			{
				return (string) this.refrow[SchemaNames.ReferedClassName];
			}
			set
			{
				// TODO:  Add DPReference.ReferedClassName setter implementation
			}
		}

		public DesignPatternDefinitions.RelationOrder Order
		{
			get
			{
				if( (string)this.refrow[SchemaNames.RelationOrder] == RelationOrder.Single.ToString())
					return RelationOrder.Single;
				return RelationOrder.Multiple;
			}
			set
			{
				// TODO:  Add DPReference.Order setter implementation
			}
		}

		public string ReferenceName
		{
			get
			{
				return (string) this.refrow[SchemaNames.ReferenceName];
			}
			set
			{
				// TODO:  Add DPReference.ReferenceName setter implementation
			}
		}

		public string ReferedComponentName
		{
			get
			{
				return (string) this.refrow[SchemaNames.ReferedComponentName];
			}
			set
			{
				// TODO:  Add DPReference.ReferedComponentName setter implementation
			}
		}

		#endregion
	}
}
